<?php
require_once("inc.member.php");

$this_title="$vars[member_title] &raquo; ".replace_tag(__("<%title%> Topup"), array("<%title%>"=>__($vars['eswallet_title'])));
$page_title=replace_tag(__("<%title%> Topup"), array("<%title%>"=>__($vars['eswallet_title'])));
$content_title=replace_tag(__("<%title%> Topup"), array("<%title%>"=>__($vars['eswallet_title'])));

$td_width=180;

require_once("inc.wallet_select.php");

//#####AJAX CALL#####
//ajax check user
if($_GET["aj"] && $_GET["check_user"]){
	if($r_user['refund_bv']>0){
		$ajmsg = __("You cannot do transfer due to this is special account.");
		$status = 2;
	}elseif($post_s['uid'] == $r_user['code']){
		$ajmsg = __("You cannot transfer to yourself.");
		$status = 2;
	}else{
		$ajresult = ajax_check_user_by_code($post_d['uid']);
		$ajresult2 = ajax_check_user_by_code($r_user['code']);
		
		if($r_user['code']<>'168168'){
		if((!is_group_matrix_downline_of($ajresult2['user_detail']['id'], $ajresult['user_detail']['id'])) && (!is_group_matrix_downline_of($ajresult['user_detail']['id'], $ajresult2['user_detail']['id']))){
			$ajmsg=__("The selected User ID is not in your network group.")."<br />";	
		}elseif($ajresult['status'] == 3){
			$ajmsg = replace_tag(__("The Member ID '<%code%>' could not be found."), array("<%code%>"=>$post_d['uid']));
			$status = "2";
		}elseif($ajresult['status'] == 2){
			$ajmsg = replace_tag(__("The Member ID '<%code%>' could not be found."), array("<%code%>"=>$post_d['uid']));
			$status = "2";		
		}elseif($ajresult['status'] == 1){
			$ajmsg = __("Member ID")." '$post_s[uid]', ".__("Username").": {$ajresult['user_detail']['username']}";
			$status = $ajresult['status'];
		}
		}		
	}

	print format_xml(array('status'=>$status, 'msg'=>$ajmsg));
	exit;
}
//#####END AJAX CALL#####

//#####TRANSFER POST#####
if($_POST["mid"]<>"" && $_POST["oid"]<>"" && $_POST["cur"]<>"" && $_POST["amt"]<>"" && $_POST["status"]<>"" && $_POST["cartid"]<>"" && $_POST["signature"]<>""){
	$datetime = date('Y-m-d H:i:s');
	
	if(!mysql_query($sql="insert into $db->payment (uid, mid, oid, cur, amt, status, cartid, singature, cdate) values (".$uid.",'".$_POST["mid"]."','".$_POST["oid"]."','".$_POST["cur"]."','".$_POST["amt"]."','".$_POST["status"]."','".$_POST["cartid"]."','".$_POST["signature"]."','".$datetime."')")){
		$errmsg.=__("We have encountered some error while performing the topup.")." ".__("You can try again later. If the problem persists, please contact us.")."<br />\n".($vars['debug']? "<br />\nSQL: $sql<br />\n<br />\nError: ".mysql_error()."<br />\n" : "");
	}else{
		$transferor_deducted=true;
		$amount = round(($_POST["amt"]/1.015) / 11, 2);
		
		$balance=mysql_result(mysql_query("select eswallet from gg_users where id=".$uid), 0) or 0;			
		$balance+=$amount;
		
		if(!mysql_query($sql="update $db->users set eswallet=eswallet+".$amount." where id='".$uid."' limit 1")){
			$errmsg.=replace_tag(__("We have encountered some error while performing the topup, please contact us."), array("<%title%>"=>__($vars['eswallet_title']), "<%x%>"=>number_format($post_s['_amount'], 2)))."<br />\n".($vars['debug']? "<br />\nSQL: $sql<br />\n<br />\nError: ".mysql_error()."<br />\n" : "");
			$critical_error.="Error when member ID #$uid performing topup.<br />\n<br />\nSQL: $sql<br />\n<br />\nError: ".mysql_error()."<br />\n";
		}else{
			$transferee_credited=true;

			//insert transfer record
			$topup_descr="Topup ".number_format($amount, 2);
			if(!mysql_query($sql="insert into $db->member_eswallet_record (uid, type, amount, bal, descr, cdate) values ('".$uid."', 'credit', '".$amount."', '".$balance."', '".$topup_descr."', '$datetime')")){
				$critical_error.="Error creating record when member ID #$uid make a topup. Please manually execute the SQL below to record the transaction:<br />\n<br />\n$sql<br />\n<br />\nError: ".mysql_error()."<br />\n";
			}
		}
	}
		
	if(!$errmsg){
		$msg=replace_tag(__("Your have successfully topup <%x%>."), array("<%currency%>"=>$vars['currency'], "<%x%>"=>number_format($amount, 2), "<%id%>"=>$post_h['uid'], "<%username%>"=>$r_to['username']))."<br />\n";
	}
	
	$msg=$msg? format_msg($msg) : "";
	$errmsg=$errmsg? format_err(__("There is some error(s), please correct them before continuing:")."<br />\n<br />\n$errmsg") : "";
}

//javascript
ob_start();
?>
<script type='text/javascript' src='<?php echo JS_URL."/get_file_gzip.php?file=".urlencode("fn/fn_number_format.js,common.js,jquery.js,jquery.livequery.js"); ?>'></script>
<script type='text/javascript'>
jQuery(document).ready(function(j){
	j('form[@name=form1]').submit(function(){
		if(j('input[@name=v_firstname]').val()==''){
			alert('Please fill in first name');
			return false;
		}else if(j('input[@name=v_lastname]').val()==''){
			alert('Please fill in last name');
			return false;
		}else if(j('input[@name=v_billemail]').val()==''){
			alert('Please fill in email');
			return false;
		}else if(j('input[@name=v_billstreet]').val()==''){
			alert('Please fill in street');
			return false;
		}else if(j('input[@name=v_billcity]').val()==''){
			alert('Please fill in city');
			return false;
		}else if(j('input[@name=v_billstate]').val()==''){
			alert('Please fill in state');
			return false;
		}else if(j('input[@name=v_billpost]').val()==''){
			alert('Please fill in postcode');
			return false;
		}else if(j('input[@name=v_billcountry]').val()==''){
			alert('Please select country');
			return false;
		}else if(j('input[@name=v_billphone]').val()==''){
			alert('Please fill in phone');
			return false;
		}else if(j('input[@name=topup_amount]').val()==''){
			alert('Please fill in topup amount');
			return false;
		}else if(j('input[@name=topup_amount]').val()<10){
			alert('Topup amount must be CNY10 and above');
			return false;
		}
	});
});

function calc_amount(){
	var topup_amount = document.getElementById('topup_amount');
	document.getElementById('v_amount').value = Math.round((topup_amount.value * 1.015) * 100) / 100;
}
</script>
<?php
$jvscript = ob_get_contents();
ob_end_clean();

//transfer form
$transfer=($errmsg || $msg? $errmsg.$msg : "").
"<p>".__("Payment via union pay card is subject to an extra 1.5% charge").'
<form id="form1" name="form1" method="post" action="https://merchant.paymentinside.com/API/PaymentInsideCheckCompany.asp" >
<input type="hidden" name="__req" value="1" />
<input type="hidden" name="CID" value="M104-C-180">
<input type="hidden" name="merchantKey" value="v3M0NX0Q">
<input type="hidden" name="v_cartID" value="'.date('YmdHisZ').'" />
                                            <table width="100%" border="0" cellpadding="0" cellspacing="1">
                                                <tr>
                                                    <td width="100%">
                                                        <table width="100%">
                                                            <tr>
                                                                <td colspan="3" align="left">
                                                                    <hr />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" align="left">
                                                                    <strong>'.__("Card Holder Details").'</strong>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("First Name").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="v_firstname" type="text" id="v_firstname" size="20" maxlength="18" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("Last Name").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="v_lastname" type="text" id="v_lastname" size="20" maxlength="18" />
                                                                </td>
                                                            </tr>
															    <tr>
                                                                <td align="left">'.__("Email").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="v_billemail" type="text" id="v_billemail" size="50" maxlength="48" value="" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("Street").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="v_billstreet" type="text" id="v_billstreet" size="50" maxlength="48" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("City").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="v_billcity" type="text" id="v_billcity" size="50" maxlength="48"  />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("State").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="v_billstate" type="text" id="v_billstate" size="50" maxlength="48"  />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("Postcode").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="v_billpost" type="text" id="v_billpost" size="50" maxlength="48" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("Country").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <select id="v_billcountry" name="v_billcountry">
                                                                        <option value="">Please select country</option>
                                                                        <option value="ALBANIA">ALBANIA</option>
                                                                        <option value="ALGERIA">ALGERIA</option>
                                                                        <option value="AMERICAN SAMOA">AMERICAN SAMOA</option>
                                                                        <option value="ANDORRA">ANDORRA</option>
                                                                        <option value="ANDORRA">ANDORRA</option>
                                                                        <option value="ANGUILLA">ANGUILLA</option>
                                                                        <option value="ANTIGUA & BARBUDA">ANTIGUA & BARBUDA</option>
                                                                        <option value="ARGENTINA">ARGENTINA</option>
                                                                        <option value="ARMENIA">ARMENIA</option>
                                                                        <option value="ARUBA">ARUBA</option>
                                                                        <option value="AUSTRALIA">AUSTRALIA</option>
                                                                        <option value="AUSTRIA">AUSTRIA</option>
                                                                        <option value="AZERBAIJAN">AZERBAIJAN</option>
                                                                        <option value="AZORES">AZORES</option>
                                                                        <option value="BAHAMAS">BAHAMAS</option>
                                                                        <option value="BAHRAIN">BAHRAIN</option>
                                                                        <option value="BANGLADESH">BANGLADESH</option>
                                                                        <option value="BARBADOS">BARBADOS</option>
                                                                        <option value="BELARUS">BELARUS</option>
                                                                        <option value="BELGIUM">BELGIUM</option>
                                                                        <option value="BELIZE">BELIZE</option>
                                                                        <option value="BENIN">BENIN</option>
                                                                        <option value="BERMUDA">BERMUDA</option>
                                                                        <option value="BOLIVIA">BOLIVIA</option>
                                                                        <option value="BONAIRE">BONAIRE</option>
                                                                        <option value="BOSNIA">BOSNIA</option>
                                                                        <option value="BOTSWANA">BOTSWANA</option>
                                                                        <option value="BRAZIL">BRAZIL</option>
                                                                        <option value="BRITISH VIRGIN ISLES">BRITISH VIRGIN ISLES</option>
                                                                        <option value="BRUNEI">BRUNEI</option>
                                                                        <option value="BULGARIA">BULGARIA</option>
                                                                        <option value="BURKINA FASO">BURKINA FASO</option>
                                                                        <option value="BURUNDI">BURUNDI</option>
                                                                        <option value="CAMBODIA">CAMBODIA</option>
                                                                        <option value="CAMEROON">CAMEROON</option>
                                                                        <option value="CANADA">CANADA</option>
                                                                        <option value="CANARY ISLANDS">CANARY ISLANDS</option>
                                                                        <option value="CAPE VERDE">CAPE VERDE</option>
                                                                        <option value="CAYMAN ISLANDS">CAYMAN ISLANDS</option>
                                                                        <option value="CENTRAL">CENTRAL AFRICAN REPUBLIC</option>
                                                                        <option value="CHAD">CHAD</option>
                                                                        <option value="CHILE">CHILE</option>
                                                                        <option value="CHINA">CHINA</option>
                                                                        <option value="COLOMBIA">COLOMBIA</option>
                                                                        <option value="CONGO">CONGO</option>
                                                                        <option value="COOK ISLAND">COOK ISLAND</option>
                                                                        <option value="COSTA RICA">COSTA RICA</option>
                                                                        <option value="CROATIA">CROATIA</option>
                                                                        <option value="CURACAO">CURACAO</option>
                                                                        <option value="CYPRUS">CYPRUS</option>
                                                                        <option value="CZECH">CZECH REPUBLIC</option>
                                                                        <option value="DENMARK">DENMARK</option>
                                                                        <option value="DJIBOUTI">DJIBOUTI</option>
                                                                        <option value="DOMINICA">DOMINICA</option>
                                                                        <option value="DOMINICAN">DOMINICAN REPUBLIC</option>
                                                                        <option value="ECUADOR">ECUADOR</option>
                                                                        <option value="EGYPT">EGYPT</option>
                                                                        <option value="EL SALVADOR">EL SALVADOR</option>
                                                                        <option value="ENGLAND">ENGLAND</option>
                                                                        <option value="EQUATORIAL">EQUATORIAL GUINEA</option>
                                                                        <option value="ERITREA">ERITREA</option>
                                                                        <option value="ESTONIA">ESTONIA</option>
                                                                        <option value="ETHIOPIA">ETHIOPIA</option>
                                                                        <option value="FAEROE">FAEROE ISLANDS</option>
                                                                        <option value="FIJI">FIJI</option>
                                                                        <option value="FINLAND">FINLAND</option>
                                                                        <option value="FRANCE">FRANCE</option>
                                                                        <option value="FRENCH GUIANA">FRENCH GUIANA</option>
                                                                        <option value="FRENCH POLYNESIA">FRENCH POLYNESIA</option>
                                                                        <option value="GABON">GABON</option>
                                                                        <option value="GAMBIA">GAMBIA</option>
                                                                        <option value="GEORGIA">GEORGIA</option>
                                                                        <option value="GERMANY">GERMANY</option>
                                                                        <option value="GHANA">GHANA</option>
                                                                        <option value="GIBRALTAR">GIBRALTAR</option>
                                                                        <option value="GREECE">GREECE</option>
                                                                        <option value="GREENLAND">GREENLAND</option>
                                                                        <option value="GRENADA">GRENADA</option>
                                                                        <option value="GUADELOUPE">GUADELOUPE</option>
                                                                        <option value="GUAM">GUAM</option>
                                                                        <option value="GUATEMALA">GUATEMALA</option>
                                                                        <option value="GUERNSEY">GUERNSEY</option>
                                                                        <option value="GUINEA">GUINEA</option>
                                                                        <option value="GUINEA-BISSAU">GUINEA-BISSAU</option>
                                                                        <option value="GUYANA">GUYANA</option>
                                                                        <option value="HAITI">HAITI</option>
                                                                        <option value="HOLLAND">HOLLAND</option>
                                                                        <option value="HONDURAS">HONDURAS</option>
                                                                        <option value="HONG KONG">HONG KONG</option>
                                                                        <option value="HUNGARY">HUNGARY</option>
                                                                        <option value="ICELAND">ICELAND</option>
                                                                        <option value="INDIA">INDIA</option>
                                                                        <option value="INDONESIA">INDONESIA</option>
                                                                        <option value="IRELAND">IRELAND</option>
                                                                        <option value="ISRAEL">ISRAEL</option>
                                                                        <option value="ITALY">ITALY</option>
                                                                        <option value="JAMAICA">JAMAICA</option>
                                                                        <option value="JAPAN">JAPAN</option>
                                                                        <option value="JERSEY">JERSEY</option>
                                                                        <option value="JORDAN">JORDAN</option>
                                                                        <option value="KAZAKHSTAN">KAZAKHSTAN</option>
                                                                        <option value="KENYA">KENYA</option>
                                                                        <option value="KIRIBATI">KIRIBATI</option>
                                                                        <option value="KOSRAE">KOSRAE</option>
                                                                        <option value="KUWAIT">KUWAIT</option>
                                                                        <option value="KYRGYZSTAN">KYRGYZSTAN</option>
                                                                        <option value="LAOS">LAOS</option>
                                                                        <option value="LATVIA">LATVIA</option>
                                                                        <option value="LEBANON">LEBANON</option>
                                                                        <option value="LESOTHO">LESOTHO</option>
                                                                        <option value="LIBERIA">LIBERIA</option>
                                                                        <option value="LIECHTENSTEIN">LIECHTENSTEIN</option>
                                                                        <option value="LITHUANA">LITHUANA</option>
                                                                        <option value="LUXEMBOURG">LUXEMBOURG</option>
                                                                        <option value="MACAU">MACAU</option>
                                                                        <option value="MACEDONIA">MACEDONIA</option>
                                                                        <option value="MADAGASCAR">MADAGASCAR</option>
                                                                        <option value="MADEIRA">MADEIRA</option>
                                                                        <option value="MALAWI">MALAWI</option>
                                                                        <option value="MALAYSIA">MALAYSIA</option>
                                                                        <option value="MALDIVES">MALDIVES</option>
                                                                        <option value="MALI">MALI</option>
                                                                        <option value="MALTA">MALTA</option>
                                                                        <option value="MARSHALL">MARSHALL ISLANDS</option>
                                                                        <option value="MARTINIQUE">MARTINIQUE</option>
                                                                        <option value="MAURITANIA">MAURITANIA</option>
                                                                        <option value="MAURITIUS">MAURITIUS</option>
                                                                        <option value="MEXICO">MEXICO</option>
                                                                        <option value="MICRONESIA">MICRONESIA</option>
                                                                        <option value="MOLDOVA">MOLDOVA</option>
                                                                        <option value="MONACO">MONACO</option>
                                                                        <option value="MONGOLIA">MONGOLIA</option>
                                                                        <option value="MONTSERRAT">MONTSERRAT</option>
                                                                        <option value="MOROCCO">MOROCCO</option>
                                                                        <option value="MOZAMBIQUE">MOZAMBIQUE</option>
                                                                        <option value="MARIANA">N. MARIANA ISLANDS</option>
                                                                        <option value="NAMIBIA">NAMIBIA</option>
                                                                        <option value="NEPAL">NEPAL</option>
                                                                        <option value="NETHERLANDS">NETHERLANDS</option>
                                                                        <option value="NETHERLANDS">NETHERLANDS ANTILLES</option>
                                                                        <option value="NEW CALEDONIA">NEW CALEDONIA</option>
                                                                        <option value="NEW ZEALAND">NEW ZEALAND</option>
                                                                        <option value="NICARAGUA">NICARAGUA</option>
                                                                        <option value="NIGER">NIGER</option>
                                                                        <option value="NIGERIA">NIGERIA</option>
                                                                        <option value="NORFOLK">NORFOLK ISLAND</option>
                                                                        <option value="NORTHERN">NORTHERN IRELAND</option>
                                                                        <option value="NORWAY">NORWAY</option>
                                                                        <option value="OMAN">OMAN</option>
                                                                        <option value="PAKISTAN">PAKISTAN</option>
                                                                        <option value="PALAU">PALAU</option>
                                                                        <option value="PANAMA">PANAMA</option>
                                                                        <option value="PAPUA">PAPUA NEW GUINEA</option>
                                                                        <option value="PARAGUAY">PARAGUAY</option>
                                                                        <option value="PERU">PERU</option>
                                                                        <option value="PHILIPPINES">PHILIPPINES</option>
                                                                        <option value="POLAND">POLAND</option>
                                                                        <option value="PONAPE">PONAPE</option>
                                                                        <option value="PORTUGAL">PORTUGAL</option>
                                                                        <option value="PUERTO">PUERTO RICO</option>
                                                                        <option value="ALBANIA">QATAR</option>
                                                                        <option value="REUNION">REUNION</option>
                                                                        <option value="ROMANIA">ROMANIA</option>
                                                                        <option value="ROTA">ROTA</option>
                                                                        <option value="RUSSIA">RUSSIA</option>
                                                                        <option value="RWANDA">RWANDA</option>
                                                                        <option value="SABA">SABA</option>
                                                                        <option value="SAIPAN">SAIPAN</option>
                                                                        <option value="MARINO">SAN MARINO</option>
                                                                        <option value="SAUDI">SAUDI ARABIA</option>
                                                                        <option value="SCOTLAND">SCOTLAND</option>
                                                                        <option value="SENEGAL">SENEGAL</option>
                                                                        <option value="SEYCHELLES">SEYCHELLES</option>
                                                                        <option value="SIERRA">SIERRA LEONE</option>
                                                                        <option value="SINGAPORE">SINGAPORE</option>
                                                                        <option value="SLOVAKIA">SLOVAKIA</option>
                                                                        <option value="SLOVENIA">SLOVENIA</option>
                                                                        <option value="SOLOMAN">SOLOMAN ISLANDS</option>
                                                                        <option value="SOUTH AFRICA">SOUTH AFRICA</option>
                                                                        <option value="SOUTH KOREA">SOUTH KOREA</option>
                                                                        <option value="SPAIN">SPAIN</option>
                                                                        <option value="LANKA">SRI LANKA</option>
                                                                        <option value="CHRISTOPHER">ST. CHRISTOPHER</option>
                                                                        <option value="CROIX">ST. CROIX</option>
                                                                        <option value="EUSTATIUS">ST. EUSTATIUS</option>
                                                                        <option value="JOHN">ST. JOHN</option>
                                                                        <option value="ST. KITTS & NEVIS">ST. KITTS & NEVIS</option>
                                                                        <option value="LUCIA">ST. LUCIA</option>
                                                                        <option value="MAARTEN">ST. MAARTEN</option>
                                                                        <option value="MARTIN">ST. MARTIN</option>
                                                                        <option value="THOMAS">ST. THOMAS</option>
                                                                        <option value="ST. VINCENT/GRENADINE">ST. VINCENT/GRENADINE</option>
                                                                        <option value="ST.BARTHELEMY">ST.BARTHELEMY</option>
                                                                        <option value="SURINAME">SURINAME</option>
                                                                        <option value="SWAZILAND">SWAZILAND</option>
                                                                        <option value="SWEDEN">SWEDEN</option>
                                                                        <option value="SWITZERLAND">SWITZERLAND</option>
                                                                        <option value="SYRIA">SYRIA</option>
                                                                        <option value="TAHITI">TAHITI</option>
                                                                        <option value="TAIWAN">TAIWAN</option>
                                                                        <option value="TAJIKISTAN">TAJIKISTAN</option>
                                                                        <option value="TANZANIA">TANZANIA</option>
                                                                        <option value="THAILAND">THAILAND</option>
                                                                        <option value="TINIAN">TINIAN</option>
                                                                        <option value="TOGO">TOGO</option>
                                                                        <option value="TONGA">TONGA</option>
                                                                        <option value="TORTOLA">TORTOLA</option>
                                                                        <option value="TRINIDAD & TOBAGO">TRINIDAD & TOBAGO</option>
                                                                        <option value="TRUK">TRUK</option>
                                                                        <option value="TUNISIA">TUNISIA</option>
                                                                        <option value="TURKEY">TURKEY</option>
                                                                        <option value="TURKMENISTAN">TURKMENISTAN</option>
                                                                        <option value="TURKS & CAICOS ISLANDS">TURKS & CAICOS ISLANDS</option>
                                                                        <option value="TUVALU">TUVALU</option>
                                                                        <option value="UGANDA">UGANDA</option>
                                                                        <option value="UKRAINE">UKRAINE</option>
                                                                        <option value="UNION ISLAND">UNION ISLAND</option>
                                                                        <option value="UNITED ARAB EMIRATES">UNITED ARAB EMIRATES</option>
                                                                        <option value="UNITED KINGDOM">UNITED KINGDOM</option>
                                                                        <option value="UNITED STATES">UNITED STATES</option>
                                                                        <option value="URUGUAY">URUGUAY</option>
                                                                        <option value="US VIRGIN ISLANDS">US VIRGIN ISLANDS</option>
                                                                        <option value="UZBEKISTAN">UZBEKISTAN</option>
                                                                        <option value="VANUATU">VANUATU</option>
                                                                        <option value="VATICAN CITY STATE">VATICAN CITY STATE</option>
                                                                        <option value="VENEZUELA">VENEZUELA</option>
                                                                        <option value="VIETNAM">VIETNAM</option>
                                                                        <option value="VIRGIN GORDA">VIRGIN GORDA</option>
                                                                        <option value="WALES">WALES</option>
                                                                        <option value="WALLIS & FUTUNA ISLANDS">WALLIS & FUTUNA ISLANDS</option>
                                                                        <option value="WESTERN SAMOA<">WESTERN SAMOA</option>
                                                                        <option value="YAP">YAP</option>
                                                                        <option value="YEMEN">YEMEN</option>
                                                                        <option value="YUGOSLAVIA">YUGOSLAVIA</option>
                                                                        <option value="ZAMBIA">ZAMBIA</option>
                                                                        <option value="ZIMBABWE">ZIMBABWE</option>
                                                                        <option value="MYANMAR">MYANMAR</option>
                                                                        <option value="OTHERS">OTHERS</option>
                                                                    </select>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("Phone").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
																<input name="v_billphone" type="text" id="v_billphone" size="50" maxlength="48" value="" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("Currency").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <select id="v_currency" name="v_currency">
                                                                        <option selected="selected" value="CNY">CNY</option>
                                                                    </select>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("Topup Amount").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="topup_amount" type="text" id="topup_amount" size="20" maxlength="18" onkeyup="calc_amount();" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left">'.__("Amount to Pay").'</td>
                                                                <td align="left" width="1%">
                                                                    :
                                                                </td>
                                                                <td align="left">
                                                                    <input name="v_amount" type="text" id="v_amount" size="20" maxlength="18" readonly />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" align="left">
                                                                    <hr />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td height="46" colspan="3" align="center" valign="middle">
                                                                    <input name="Submit" type="submit" class="bluebuttom" value="Next" />
                                             </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                </td>
            </tr>
        </table>
        </form>';

$content=$inc_wallet_select."<h2>$page_title</h2>".$transfer;
print format_member_page($content, $this_title, $content_title, $inc_jvscript . $jvscript);
?>